package cloud.test;/**
 * @Description: TODO
 * @Param: $
 * @Author: cunfeng
 * @Date: 2021/5/5 16:56
 **/

import cloud.redis.RedisClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @MethodName: 测试类
 * @Author: cunfeng
 * @Date: 2021年05月05日 16:56
 **/
@RestController

public class test {

    @Autowired
    private RedisClient redisClient;


    @RequestMapping("/set")
    public String set(String key, String value) {
        redisClient.set(key, value);
        return "success";
    }

    @RequestMapping("/get")
    public String get(String key){
        return redisClient.get(key);
    }

}
